<div class="widget newest-post">
    <h3>最新文章</h3>
    <ul>
        <?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=3')->to($posts); ?>
        <?php if($posts->have()): ?>
            <?php while($posts->next()): ?>
            <li>
                <a title="<?php $posts->title(); ?>" href="<?php $posts->permalink(); ?>" draggable="false">
                    <span class="thumbnail">
                        <img class="thumb"
                            data-original="/usr/themes/max/dist/img/default.jpg"
                            src="/usr/themes/max/dist/img/default.jpg"
                            alt="<?php $posts->title(); ?>" draggable="false">
                    </span>
                    <span class="text"><?php $posts->title(); ?></span>
                    <span class="muted">
                        <i class="glyphicon glyphicon-user"></i> <?php $this->author(); ?>
                    </span>
                    <span class="muted">
                        <i class="glyphicon glyphicon-time"></i>
                        <?php $posts->date(); ?>
                    </span>
                    <span class="muted">
                        <i class="glyphicon glyphicon-comment"></i><?php $posts->commentsNum(); ?>
                    </span>
                </a>
            </li>
            <?php endwhile; ?>
        <?php else: ?>
            <li><em><?php _e('暂时没有文章'); ?></em></li>
        <?php endif; ?>
    </ul>
</div>